﻿<Page x:Class="WpfControlss.ButtonSample"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
    Height="350" Width="794" Loaded="Window_Loaded">
    <Grid>
        <GroupBox Header="ClickMode"    Margin="22,11,580,152" >
            <Grid >
                <Button Content="{Binding RelativeSource={RelativeSource Mode=Self},Path=ClickMode}" ClickMode="Hover" Height="23" HorizontalAlignment="Left" Name="button1" VerticalAlignment="Top" Width="75" />
                <Button ClickMode="Press" Content="{Binding RelativeSource={RelativeSource Self}, Path=ClickMode}" Height="23" HorizontalAlignment="Left" Margin="0,42,0,0" Name="button2" VerticalAlignment="Top" Width="75" />
                <Button ClickMode="Release" Content="{Binding RelativeSource={RelativeSource Self}, Path=ClickMode}" Height="22" HorizontalAlignment="Left" Margin="0,85,0,0" Name="button3" VerticalAlignment="Top" Width="75" />
            </Grid>
        </GroupBox>
        <GroupBox Header="RepeatButton" Height="100" HorizontalAlignment="Left" Margin="19,165,0,0" Name="groupBox1" VerticalAlignment="Top" Width="200">
            <Grid >
                <TextBlock   Name="txt" Background="AliceBlue" Width="100" Height="20" VerticalAlignment="Top"/>
                <RepeatButton  Width="75" Height="25" Content="Increase" Delay="500" Interval="500"  HorizontalAlignment="Left" VerticalAlignment="Bottom" Click="RepeatButton_Click"/>
                <RepeatButton  Width="75" Height="25" Content="Decrease" Delay="500" Interval="500" HorizontalAlignment="Right" VerticalAlignment="Bottom" Click="RepeatButton_Click"/>
            </Grid>
        </GroupBox>
        <GroupBox Header="IsDefualt IsCancel" Height="100" HorizontalAlignment="Left" Margin="235,28,0,0" Name="groupBox2" VerticalAlignment="Top" Width="152">
            <Grid >
                <Button Content="Default" IsDefault="True" Height="23" HorizontalAlignment="Left" Margin="6,6,0,0" Name="button4" VerticalAlignment="Top" Width="75" Click="button4_Click" />
                <Button Content="Cancel"  IsCancel="True" Height="23" HorizontalAlignment="Left" Margin="6,48,0,0" Name="button5" VerticalAlignment="Top" Width="75"  Click="button4_Click"/>
            </Grid>
        </GroupBox>
        <GroupBox Header="AutoPeer" Height="100" HorizontalAlignment="Left" Margin="229,182,0,0" Name="groupBox3" VerticalAlignment="Top" Width="200">
            <Grid>
                <Button Content="AutoPeer"  Height="23" HorizontalAlignment="Left" Margin="6,17,0,0" Name="btnAutoPeer" VerticalAlignment="Top" Width="75" Click="btnAutoPeer_Click" />
                <Button Content="Test"  Height="23" HorizontalAlignment="Left" Margin="96,14,0,0" Name="btnTest" VerticalAlignment="Top" Width="75" Click="btnTest_Click" />
      </Grid>
        </GroupBox>
        <GroupBox Header="ToggleButton" Height="143" HorizontalAlignment="Left" Margin="402,11,0,0" Name="groupBox4" VerticalAlignment="Top" Width="229">
            <Grid   >
                <ToggleButton  Width="50" Height="50" Content="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}"
                               HorizontalAlignment="Left" />
                <ToggleButton  Width="50" Height="50" Content="{Binding RelativeSource={RelativeSource Mode=Self},Path=IsChecked}"
                               HorizontalAlignment="Right" IsThreeState="True" />
            </Grid>
        </GroupBox>
    <Grid Margin="532,216,74,57">
      <Rectangle   Height="43" RadiusX="5" RadiusY="5" HorizontalAlignment="Left" Margin="6,17,0,0" Name="button6" VerticalAlignment="Top" Width="143" >
        <Rectangle.Fill>
          <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
            <LinearGradientBrush.GradientStops>
              <GradientStop Color="#F0F0F0" Offset="0" />
              <GradientStop Color="#908D8D" Offset="0.45" />
              <GradientStop Color="#8D8A8A" Offset="0.5" />
              <GradientStop Color="#CAC6C6" Offset="1" />
            </LinearGradientBrush.GradientStops>
          </LinearGradientBrush>
        </Rectangle.Fill>
      </Rectangle>

    </Grid>
  </Grid>
</Page>
